

************************
*Gilens' (2012) data

*Originally accessed here:
*http://www.russellsage.org/research/data/economic-inequality-and-political-representation

*Above link is broken, but original version of data still available here:
*https://web.archive.org/web/20130119074813/http://www.russellsage.org/sites/all/files/datasets/DS1_0.dta

*To ensure replication of Gilens' original work, I use the original data, but
*the 2015 version of data available here:
*https://www.russellsage.org/datasets/economic-inequality-and-political-representation

clear all
use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear 

*****************
**Recode outcome so dichotomous
*****************

gen policyadopted =.
recode policyadopted .=0 if OUTCOME==0
recode policyadopted .=1 if OUTCOME==2
recode policyadopted .=1 if OUTCOME==3
recode policyadopted .=1 if OUTCOME==4

******************
**Recode variables following Gilens 2012, p.74
******************

gen  pred50_sw_lor = log(pred50_sw/(1- pred50_sw))

gen  pred90_sw_lor = log(pred90_sw/(1- pred90_sw))

gen  pred10_sw_lor = log(pred10_sw/(1- pred10_sw))

gen PREDALL_SW_lor = log(PREDALL_SW/(1-PREDALL_SW))

*********************
**Replicate Gilens Table 3.1, p.76
**Not reported in ms, but generates exact replication
*********************

logit policyadopted PREDALL_SW_lor
logit policyadopted pred10_sw_lor
logit policyadopted pred50_sw_lor
logit policyadopted pred90_sw_lor
